<template>
  <view>
		<view class="tui-actionsheet"  :class="[show ? 'tui-actionsheet-show' : '']">
			<view class="regional-selection">
				<view class="specs">
				    <view class="specs-top">
				        <view style="font-size: 35rpx;font-weight: bold">使用说明</view>  
						<view class="flex cancel-button">
							<u-icon name="close-circle" color="#999999" size="22" @click="handleClickMask()"></u-icon>					
						</view>   
				    </view>									
					<view class="flex justify-between mt-20 align-center ">
						<view class="flex flex-direction mt-20 ml-20">
							<text style="font-size: 28rpx;color: #011F37;">配件、器材使用方法 </text>
							<text class="mt-10" style="font-size: 24rpx;color: rgba(1, 31, 55, 0.6);">16.05M</text>
						</view>
						<view  style="display: flex; width: 95px; height:80rpx; padding-right:20rpx; margin-right: 20rpx;" @click="open_show">
							<u-button  type="primary" shape="circle"  size="small" iconColor="linear-gradient(-90deg, #FFA200 0%, #FFC13D 100%)" color="linear-gradient(-90deg, #FFA200 0%, #FFC13D 100%)" text="查看"></u-button>
						</view>
					</view>
		            <view class="flex mt-20 align-center ml-20">
						<u-icon name="error-circle" color="#FFA200" size="18"></u-icon>
						<text class="ml-15" style="font-size: 28rpx;color: #FFA200;">查看说明会消耗对应文件大小流量 </text>
					</view>	
				</view>			
			</view>
		</view>
		<!-- 遮罩层 -->
		<view  class="tui-actionsheet-mask"  :class="[show ? 'tui-mask-show' : '']"	  @tap="handleClickMask"></view>
  </view>
</template>
 
<script>
export default {
  // name: "tuiActionsheet",
  props: {
    //点击遮罩 是否可关闭
    maskClosable: {
      type: Boolean,
      default: true,
    },
    //显示操作菜单
    show: {
        type: Boolean,
        default: false,
       },
    },
	data(){
		return{
			shopInfo:{},
			goods_send:{}
		}
	},
	created() {
		this.shopInfo = uni.getStorageSync('shopInfo')
	},
    methods:  {
		handleClickMask() {
			 this.$emit("useCancel",{type:1});
		},   
		NgoodsSpec(goodsId){
			let that=this
			let obj_data={
			   goodsId,
			   type:4
			}  
			this.$http.shopInfo(obj_data).then(res =>{
			 if(res.resCode=="9999"){					
				that.goods_send=res.data.list
			 }else{
			   uni.showToast({title:res.resMessage,icon:"none"})
			 }
			})
		},
		
		open_show(){
			console.log('open',this.goods_send.goods_video)
			my.downloadFile({
			// 示例 url，并非真实存在
			  url: this.goods_send.goods_video,
			  success({ apFilePath }) {
				my.hideLoading();
				my.openDocument({
				  filePath: apFilePath,
				  fileType: 'pdf',
				  success: (res) => {
					console.log('open document success')
					}
				  })
				}
			  })
		}
    },
};
</script>
 
<style scoped lang="less">
	.tag{
		display: flex;
		justify-content: center;
		align-items: center;
		text-align: center;
		font-size: 28rpx;
		font-weight: 400;
		color: #011F37;
		border-radius: 4px;
		background:rgba(15,21,30,0.05);
		padding: 26rpx;
	 
	}
	.classify-cell-recom{
	  display: flex;
	  flex-direction: column;
	  justify-content: center;
	 /* align-items: center; */
	  width: 28%;
	  margin: 20rpx 10rpx 0rpx 20rpx;
	  border-radius: 10rpx;  
	}
	
	.cancel-button{
		position: absolute;
		margin-top: 10rpx;
		right: 20rpx;
	}
	
.u-button--plain.u-button--primary.data-v-3bf2dba7{
	border: 2px solid #FFA200!important;
	color: #FFA200 !important;
}
.tui-actionsheet {
  width: 100%;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  visibility: hidden;
  transform: translate3d(0, 100%, 0);
  transform-origin: center;
  transition: all 0.3s ease-in-out;
  // background: #eaeaec;
  min-height: 100rpx;

}
 
.tui-actionsheet-show {
  transform: translate3d(0, 0, 0);
  visibility: visible;
}
.regional-selection {
    // text-align: center;
  // height: 391rpx;
  padding-bottom: 100rpx;
  background: #fff;
  border-radius: 20rpx 20rpx 0rpx 0rpx;
}
.tui-actionsheet-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9996;
  transition: all 0.3s ease-in-out;
  opacity: 0;
  visibility: hidden;
  
}
 
.tui-mask-show {
  opacity: 1;
  visibility: visible;
}


/* component/specs/index.wxss */

.specs-top-desc{
  display: flex;
  flex-direction: column;
  font-size: 25rpx;
  margin-left: 35rpx;
  color: gray;
  margin-top: 15rpx;
  
}

.specs-top-title{
  display: flex;
  flex-direction: row;
  justify-content: left;
  font-size: 25rpx;
  margin-left: 35rpx;  
  margin-top: 25rpx;
  
}

.localtion{
  display: flex;
  flex-direction: row;
  color: gray;
}

.specs-top{
  display: flex;
  flex-direction: row;
  font-size: 23rpx;
  justify-content: center;
  align-items: center;
  padding-bottom: 10rpx;
  // border-bottom: 1rpx solid rgb(240, 235, 235);
  padding-top: 20rpx;
 

 
}


</style>